﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Basic.master" AutoEventWireup="true" CodeFile="Default1.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

    <script language="javascript" type="text/javascript">
	    function Set()
	    {
	        document.getElementById('FileUpload').removeAttribute('innerText');
	    }
	</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FullBody" Runat="Server">

<div class="LeftBody">
    <asp:LinkButton ID="l1" PostBackUrl="~/1/Default.aspx" runat="server" Text=""/>        
    
    <asp:Panel ID="panelUser">
        <asp:Repeater ID="rptBasic" runat="server">
            <ItemTemplate>
                <div class="Windows">
                    <span id="capture"><%#Eval("TenTaiKhoan")%></span>
                    <span class="avatar"><img src="./img/users/<%#Eval("MaTaiKhoan")%>/<%#Eval("Avatar")%>" alt="avatar"/></span>
                    <br />UserID: <%#Eval("MaTaiKhoan")%>
                </div>
                
                <div class="Windows"> 
                    <span id="capture">ĐẤU GIÁ</span>
                    <ul>
                        <li><a href="#" onclick="javascript:__doPostBack('dangthamgia',<%#Eval("MaTaiKhoan")%>); return false">Đang tham gia</a></li>
                        <%--<li><a href="#" onclick="javascript:__doPostBack('phiendathang',<%#Eval("MaTaiKhoan")%>); return false">Phiên đã thắng</a></li>--%>
                        <li><a href="#" onclick="javascript:__doPostBack('lichsudaugia',<%#Eval("MaTaiKhoan")%>); return false">Lịch sử đấu giá</a></li>
                        <li><a href="#" onclick="javascript:__doPostBack('dangsanphammoi',<%#Eval("MaTaiKhoan")%>); return false">Đăng sản phẩm mới</a></li>        
                    </ul>
                </div>
                
                
                <div class="Windows">
                    <span id="capture">THÔNG TIN CÁ NHÂN</span>
                    <ul>
                        <li><a href="#" onclick="javascript:__doPostBack('ttcanhan','<%#Eval("TenTaiKhoan")%>'); return false">Thông tin cá nhân </a></li>
                        <li><a href="#" onclick="javascript:__doPostBack('doimatkhau',<%#Eval("MaTaiKhoan")%>); return false">Thay đổi mật khẩu</a></li>
                    </ul>
                </div>
                
                <div class="Windows">
                    <span id="capture">CÀI ĐẶT</span>
                    <ul>
                        <%--<li><a target="_self" href="#" onclick="javascript:__doPostBack('emailthongbao',<%#Eval("MaTaiKhoan")%>); return false">Nhận email thông báo</a></li>--%>
                        <li><a target="_self" href="#" onclick="javascript:__doPostBack('phuchoimatkhau',<%#Eval("MaTaiKhoan")%>); return false">Phục hồi mật khẩu</a></li>
                    </ul>
                </div>
            </ItemTemplate>
        </asp:Repeater>
    </asp:Panel>
    
    
    
        
</div>


<div class="MainBody">    
    <asp:Panel ID="panelUserDetail" runat="server">
        <div class="Windows">
            <span id="capture">Chi tiết tài khoản</span>
                <span id="label">Họ tên</span>
                <span id="value"><asp:TextBox ID="txtHoTen" runat="server"></asp:TextBox> </span>
                      
                <span id="label">Ngày sinh</span>
                <span id="value"><asp:TextBox ID="txtNgaySinh" runat="server"></asp:TextBox> </span>                          
                
                <span id="label">Nơi Sinh</span>
                <span id="value"><asp:TextBox ID="txtNoiSinh" runat="server"></asp:TextBox> </span>
                
                <span id="label">Địa chỉ</span>
                <span id="value"><asp:TextBox ID="txtDiaChi" runat="server"></asp:TextBox> </span>
                
                <span id="label">Điện thoại</span>
                <span id="value"><asp:TextBox ID="txtDienThoai" runat="server"></asp:TextBox> </span>
                
                <span id="label">Giới tính</span>
                <span id="value"><asp:TextBox ID="txtGioiTinh" runat="server"></asp:TextBox> </span>
                
                <span id="label">Email</span>
                <span id="value"><asp:TextBox ID="txtEmail" runat="server" ReadOnly="true"></asp:TextBox></span>
                
                <span id="label">Mã thẻ tín dụng</span>
                <span id="value"><asp:TextBox ID="txtMaTheTinDung" runat="server"></asp:TextBox> </span>
                
                <span id="label">Loại tài khoản</span>
                <span id="value"><asp:TextBox ID="txtTenLoaiTaiKhoan" runat="server" ReadOnly="true"></asp:TextBox></span>
                
                <span id="label">.</span>
                <span id="value"><asp:Button ID="btUpdate" Text="Cập nhật" runat="server" OnClick="UpdateUserProfile" /></span>
                
            <div class="vide"></div>
        </div>
    </asp:Panel>
    
    <asp:Panel ID="panelDangSanPham" runat="server" Visible="false">
        <div class="Windows">
            <span id="capture">Đăng sản phẩm mới</span>
            
            <span id="label">Tên sản phẩm</span>
            <span id="value"><asp:TextBox ID="txtTenSanPham" Width="262px" runat="server"></asp:TextBox></span>
            
            <span id="label">Loại sản phẩm</span>
            <span id="value"><asp:DropDownList ID="DropDownListLoaiSanPham" Width="267px" runat="server"></asp:DropDownList></span>
            
            <span id="label">Giá khởi điểm (vnd)</span>
            <span id="value"><asp:TextBox ID="txtGiaKhoiDiem" Width="262px" runat="server"></asp:TextBox></span>            
                        
            <span id="label">Ngày hết hạn</span>
            <span id="value"><asp:Calendar ID="calendar" runat="server"></asp:Calendar></span>
            
            <span id="label">Giờ kết thúc</span>
            <span id="value" style="float:left; width:auto"><asp:TextBox ID="txtGioKetThuc" Width="262px" runat="server"></asp:TextBox></span>
            <span id="value" style="width:330px; height:22px; font-weight:normal;">(Theo định dạng: 12:45 AM | 10:30 PM)</span>
            
            <span id="label">Tình trạng sản phẩm</span>
            <span id="value"><asp:DropDownList ID="DropDownListTinhTrangSP" Width="266px" runat="server"></asp:DropDownList></span>
            
            <span id="label">Mô tả sản phẩm</span>
            <span id="value"><asp:TextBox ID="txtMoTa" TextMode="MultiLine" Width="500px" Height="100px" MaxLength="500" runat="server"></asp:TextBox></span>            
            
            <div style="width:99%; margin:15px 0 5px 150px; float:left;"> Chọn hình ảnh/video giới thiệu sản phẩm:</div>
            <div id="up" style="margin-left:150px; padding-top:100px;">
                <input id="FileUpload" onpropertychange="Set()" type="file" size="62" runat="server"/>
                <asp:Button ID="btnAttach" runat="server" OnClick="btnAttach_Click" Text="Thêm hình này"></asp:Button>
                <asp:ListBox ID="ListBox1" runat="server" Width="508px" Height="93px"></asp:ListBox>
                <asp:Button ID="btnDelete" runat="server" OnClick="btnDelete_Click" Text="Delete" Width="58px"></asp:Button>
                <asp:Label ID="Label1" runat="server" Width="476px" ForeColor="Red"></asp:Label>
            </div>
            
            <span id="value" style="margin: 10px 0 0 152px;"> 
                <asp:Button PostBackUrl="" OnClick="EnterNewProduct" runat="server" Text="Đăng sản phẩm"></asp:Button>
            </span>                
            <asp:Label ID="StatusLabel" runat="server" Text=""></asp:Label>
            
            <div class="vide"></div>
        </div>
    
    </asp:Panel>    
    
    <asp:Panel ID="panelChangePassword" runat="server" Visible="false">
    <div class="Windows">
        <span id="label"> Mật khẩu cũ</span> <span id="value"><asp:TextBox ID="txtOldPass" runat="server"></asp:TextBox></span>
        <span id="label"> Mật khẩu mới</span> <span id="value"><asp:TextBox ID="txtNewPass1" runat="server"></asp:TextBox></span>
        <span id="label"> Xác nhận mật khẩu mới</span> <span id="value"><asp:TextBox ID="txtNewPass2" runat="server"></asp:TextBox></span>
        <span id="label">.</span> <span id="value"><asp:Button id="btChangePassword" runat="server" OnClick="ChangeUserPassword" Text="Lưu" /></span>
    </div>    
    </asp:Panel>
    
    <asp:Panel id="panelPhucHoiMatKhau" runat="server" Visible="false">
        <div class="Windows">
        <span id="label">Địa chỉ email của bạn: </span> <span id="value"><asp:TextBox ID="txtEmailQuenMatKhau" runat="server"></asp:TextBox></span>
        <span id="label">.</span> 
        <span id="value"><asp:Button id="Button1" runat="server" OnClick="PhucHoiMatKhau" Text="Tạo mật khẩu mới giúp tôi." /></span>
    </div>    
    </asp:Panel>
    
    <asp:Panel ID="panelThamGiaDauGia" runat="server" Visible="false">
        <div id="Windows">
            <div id="capture"><asp:Label ID="lbPhien" runat="server">Các phiên đã tham gia</asp:Label></div>
                
            <asp:DataGrid id="DataGrid1" runat="server" CssClass="grid" 
                AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" 
                BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical" Width="100%">
                
                <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                <SelectedItemStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" 
                    Mode="NumericPages" />
                <AlternatingItemStyle BackColor="#DCDCDC" />
                <ItemStyle BackColor="#EEEEEE" ForeColor="Black" />
                
               <Columns>
                    <asp:HyperLinkColumn HeaderText="Tên sản phẩm" ItemStyle-Width="50%" ItemStyle-HorizontalAlign="Left" 
                        DataNavigateUrlFormatString="./Detail.aspx?MSP={0}" DataTextField="TenSanPham" DataNavigateUrlField="MaSanPham">
                    </asp:HyperLinkColumn>
                                        
                    <asp:BoundColumn DataField="NgayHetHan" ReadOnly="True" HeaderText="Ngày hết hạn" ItemStyle-Width="30%"/>
                    <asp:BoundColumn DataField="GiaHienTai" ReadOnly="True" HeaderText="Giá hiện tại" ItemStyle-Width="20%" />
               </Columns>
                <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
            </asp:DataGrid>
            
        </div>
    </asp:Panel>
    
</div>

    <asp:Label ID="lb1" Text="" Visible="true" runat="server"></asp:Label><br />
    <asp:Label ID="lb2" Text="" Visible="true" runat="server"></asp:Label>
</asp:Content>

